Alibabacloud.com offers a wide variety of articles about mysql data type conversion, easily find your mysql data type conversion information here online.
MySQL basics 06 data type (6) type conversion, mysql Data Type1.Cast () Usage
In MySQL, cast (value as target type) syntax can be used for conversion of most types.
Cast must be followed by left parentheses:
Mysql> select cast (123 as char );
+ ---
MySQL date data type and time type usage summary MySQL date type: Date format, storage space occupied, date range comparison.
Date type storage space date format date range
-----------------------------------------------------------------------------
MySQL date type: Date Format, storage space occupied, and date range comparison.Date type storage space date format date range-----------------------------------------------------------------------------------Datetime 8 bytes YYYY-MM-DD hh: mm: SS 10
Impact of type conversion on MySQL index selection bitsCN.com
I encountered several cases where MySQL did not use the expected index. after reading some documents, I found that the impact of MySQL type conversion on index selection is not small.
For
Turn from:http://blog.chinaunix.net/space.php?uid=11327712&do=blog&id=32416MySQL Date Type: Date format, occupied storage space, date range comparison.Date type storage space date format date range-----------------------------------------------------
2.4 Expression evaluation and type conversionMySQL allows you to write expressions that include constants, function calls, and table-column references. These values can be grouped using different types of operators, such as arithmetic or comparison
Analysis of MySQL explicit type conversion, analysis of mysql explicit
CAST Function
In the previous article, we mentioned the CAST function for display type conversion. There are many benefits to avoid implicit type conversion. In fact, there are
A. Numeric type
MySQL supports numeric types in all standard SQL, including strict data types (integer,smallint,decimal,numberic), and approximate numeric data types (float,real,double presision). And on this basis to expand.
After the expansion,
1. Integral type
MySQL data type
Meaning (Signed)
tinyint (m)
1 byte range ( -128~127)
smallint (m)
2 byte range ( -32768~32767)
Mediumint (M)
3 byte range ( -8388608~8388607)
First, the literal value 1. StringA string is a sequence of characters that is caused by a single quotation mark ("') or double quotation mark ('" '). For example:‘a string‘"another string"If SQL Server mode is enabled for Nsi_quotes, you can refer
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.